<template>
    <div>
        <!-- <h2>{{ title }}</h2><button @click="changeTitle">修改标题</button> -->
    {{ name }} - {{ age }} - {{ gender }}
    <button @click="changeData">修改内容</button>
    </div>
</template>

<script>
export default {
    // props: ['title'],
    // emits: ['update:myEvent'],
    props: ['name','age','gender'],
    emits: ['update:name','update:age','update:gender'],
    methods: {
        changeData(){
            // 如果是这种整体修改的，可以用一个自定义事件统一处理
            this.$emit('update:name','王二');
            this.$emit('update:age',33);
            this.$emit('update:gender','女');
        },
        // changeTitle() {
        //     this.$emit('update:myEvent', '这个AppItem修改的内容');
        // }
    },
}
</script>

<style lang="scss" scoped></style>